package com.yuwei.router.provider

import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.tencent.mmkv.MMKV
import com.yuwei.base.path.RouterPath

/**
 * 提供服务接口具体实现类
 */
@Route(path = RouterPath.ROUTE_PROVIDER_SERVICE)
class RouteProvider: IRouteProvider {
    lateinit var mContext: Context
    override fun init(context: Context?) {
        if(context!=null){
            mContext = context
        }
    }
    override fun getLoginToken(): String {
        val token = MMKV.defaultMMKV().decodeString("token")
        return token?:""
    }

    override fun getAccessId(): String {
        val accessId = MMKV.defaultMMKV().decodeString("accessId")
        return accessId?:""
    }


}